package patterns.front;

/**
 * Created by lenovo on 2016/12/12 0012.
 * 调度器，用于分配请求
 */
public class Dispatcher {
    private HomeView homeView;
    private StudentView studentView;

    public Dispatcher() {
        studentView = new StudentView();
        homeView = new HomeView();
    }

    public void dispatch(String request){
        if (request.equalsIgnoreCase("student")){
            studentView.show();
        }else {
            homeView.show();
        }
    }
}
